package com.kayt.cyberBar.company.business.entity.po;

import java.io.Serializable;
import javax.persistence.*;

import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * The persistent class for the b_company_activity_discount_item database table.
 * 
 */
@Entity
@Table(name="b_company_activity_discount_item")
@NamedQuery(name="BCompanyActivityDiscountItem.findAll", query="SELECT b FROM BCompanyActivityDiscountItem b")
public class BCompanyActivityDiscountItem implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String code;
	private String createTime;
	private String discountCode;
	private String discount;
	private String itemCode;
	private String itemName;
	private String oldPrice;
	private String price;
	private String updateTime;
	
	private BCompanyActivityDiscount disct;

	public BCompanyActivityDiscountItem() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name="DISCOUNT_CODE")
	public String getDiscountCode() {
		return discountCode;
	}


	public void setDiscountCode(String discountCode) {
		this.discountCode = discountCode;
	}


	@Column(name="CREATE_TIME")
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}


	public String getDiscount() {
		return this.discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}


	@Column(name="ITEM_CODE")
	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}


	@Column(name="ITEM_NAME")
	public String getItemName() {
		return this.itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}


	@Column(name="OLD_PRICE")
	public String getOldPrice() {
		return this.oldPrice;
	}

	public void setOldPrice(String oldPrice) {
		this.oldPrice = oldPrice;
	}


	public String getPrice() {
		return this.price;
	}

	public void setPrice(String price) {
		this.price = price;
	}


	@Column(name="UPDATE_TIME")
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}


	@ManyToOne(targetEntity = BCompanyActivityDiscount.class, fetch = FetchType.LAZY)
	@JoinColumn(name="DISCOUNT_CODE", referencedColumnName="CODE", nullable = false, insertable=false, updatable=false)
	@JsonIgnore
	public BCompanyActivityDiscount getDisct() {
		return disct;
	}


	public void setDisct(BCompanyActivityDiscount disct) {
		this.disct = disct;
	}

}